﻿#region Styx Namespaces
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
using Styx.TreeSharp;
using Styx.WoWInternals;
using Styx.WoWInternals.DBC;
using Styx.WoWInternals.WoWObjects;
using System.Linq;
#endregion

namespace GiwinMonk
{
    public partial class Monk : CombatRoutine
    {

        /// <summary>
        /// Cost: 3.0 =% of Base Mana |
        /// Range: 5 Yards |
        /// Cast Time: Instant |
        /// GCD: 1 Second |
        /// WoWHead Hyperlink: http://www.wowhead.com/spell=100780
        /// </summary>


        public void LifeSpirit()
        {
            foreach (WoWItem item in StyxWoW.Me.BagItems.Where(o => o.Name == "Life Spirit"))
            {
                if (StyxWoW.Me.HealthPercent < 70 && !StyxWoW.Me.IsCasting && !StyxWoW.Me.IsChanneling)
                    if (item != null && item.Cooldown == 0)
                    {
                        Logging.Write("Using Life Spirit...");
                        item.Use();
                    }
            }
        }
    }
}
